<?php
/**
 * 公司简介更新数据库
 * User: wuz
 * Date: 2016/8/17
 * Time: 21:54
 */
header("content-type:text/html;charset=utf-8");
include "../Mysql/MySqlClass.php";
$MySQL = new Ycf\Lession\MySqlClass\MySqlClass('jinling_company', 'root', '123456');

session_start();
$admin                    = $MySQL->select("admin", $where = array('adminName' => $_SESSION['userName']));
$companyInformationDate   = date('y-m-d h:i:s', time()); //当前的编辑时间
$companyInformationUpdate = array(
    'companyAddress'         => $_POST['address'],
    'companyContacts'        => $_POST['contacts'],
    'mobleCompanyTel'        => $_POST['mobelTel'],
    'companyTel'             => $_POST['tel'],
    'companyFax'             => $_POST['fax'],
    'companyInformationDate' => $companyInformationDate,
    'adminId'                => $admin['id'],
);
$MySQL->update("company_information", $companyInformationUpdate, $where = array('id' => '1'));
header("Location:../contactUs.php");
